<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- 当我们打开slow 3G，开启disable cache 的时候发现屏幕会闪白 -->
    <script>
        var myImage = (function(){
            var imgNode = document.createElement('img');
            document.body.appendChild( imgNode );

            return {
              setSrc: function( src ){
                  imgNode.src = src;
              }
            }
        })();

        myImage.setSrc('https://img1.baidu.com/it/u=2165440039,133472691&fm=253&fmt=auto&app=138&f=JPEG?w=801&h=500');
    </script>
</body>
</html>